<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hello</title>
    <script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<h1>Hello World!</h1>

<button type="button" onclick="doTest()">test</button>
</body>
<script>
    function doTest(){
        var formdata = new FormData();
        formdata.append("user_id",1);
        formdata.append("date","2018-12-15");
        formdata.append("startTime","18:00");
        formdata.append("lastingTime",120);
        formdata.append("isIntellgence",1);
        formdata.append("hardware",["白板","投影仪"]);
        formdata.append("people",[2,3,4,5]);
        formdata.append("other","我需要一些A4纸");
        formdata.append("meetingName","搬砖公司年会");
        //formdata.append("room_id",0);
        var tempdata1 = {
                "app_meeting_id":54,
                "app_name":"搬砖大会",
                "app_description":"",
                "meeting_time":"2018-12-16 16:00:00",
                "during_time":120,
                "location":1,
                "em_number":3,
                "em_list":"1,3,6",
                "status":"3",
                "applicant":"4",
                "hardware_applicant":"白板,投影仪",
                "isIntelligence_allocation":0,
                "other":"搬砖公司年会",
        };
        var tempdata = {
            "user_id":1,
            "date":"2018-12-15",
            "startTime":"18:00",
            "lastingTime":120,
            "isIntellgence":1,
            "hardware":["白板","投影仪"],
            "people":[2,3,4,5],
            "other":"我需要一些A4纸",
            "meetingName":"搬砖公司年会",

        };

        console.log(tempdata);
        console.log(formdata);
        $.ajax({
            type: "post",
            url: "/MeetingManager/Meetings/bookMeeting.do",
            contentType:'application/json',
            data:JSON.stringify(tempdata),
            success: function(data){
                console.log(data);
            },
            error: function (data) {
                console.log(data);
            }
        });
    }
</script>
</html>